/**
 * 请求球员统计柱状图数据
 */
export const fetchPlayerBarChartsData = function (data = {}) {
  console.log("请求球员统计柱状图数据", data);
  return new Promise((resolve) => {
    resolve({
      code: 1,
      data: [
        {
          id: 10001,
          name: "张三1",
          score: 2,
          assistNumber: 1,
          foulNumber: 3,
        },
        {
          id: 10002,
          name: "张三2",
          score: 1,
          assistNumber: 1,
          foulNumber: 0,
        },
        {
          id: 10003,
          name: "张三3",
          score: 0,
          assistNumber: 4,
          foulNumber: 1,
        },
        {
          id: 10004,
          name: "张三4",
          score: 0,
          assistNumber: 0,
          foulNumber: 1,
        },
      ],
    });
  });
};

/**
 * 请求球队成绩饼图数据
 */
export const fetchTotalRaceScorePieChartsData = function (data = {}) {
  console.log("请求球队成绩饼图数据", data);
  return new Promise((resolve) => {
    resolve({
      code: 1,
      data: {
        success: 102,
        failed: 63,
        ping: 27,
      },
    });
  });
};

/**
 * 请求球队各项得分走势折线图数据
 */
export const fetchTimeRaceLineChartsData = function (data = {}) {
  console.log("请求球队各项得分走势折线图数据", data);
  return new Promise((resolve) => {
    resolve({
      code: 1,
      data: [
        {
          startTime: "2023/01/12",
          score: 4,
          foulTotalNumber: 5, // 犯规总数
          assistTotalNumber: 14, // 助攻总数
          outstandingTotalNumber: 18, // 过人总数
          diveTotalNumber: 4, // 扑救总数
          helpTotalNumber: 3, // 解围总数
        },
        {
          startTime: "2023/01/30",
          score: 2,
          foulTotalNumber: 1, // 犯规总数
          assistTotalNumber: 12, // 助攻总数
          outstandingTotalNumber: 7, // 过人总数
          diveTotalNumber: 3, // 扑救总数
          helpTotalNumber: 1, // 解围总数
        },
        {
          startTime: "2023/02/10",
          score: 2,
          foulTotalNumber: 1, // 犯规总数
          assistTotalNumber: 12, // 助攻总数
          outstandingTotalNumber: 7, // 过人总数
          diveTotalNumber: 3, // 扑救总数
          helpTotalNumber: 1, // 解围总数
        },
      ],
    });
  });
};
